From 5634af459573d8ec53eb89b34dcc53c91184ea07 Mon Sep 17 00:00:00 2001 From: "smh22@boulderdash.cl.cam.ac.uk" Date: Tue, 15 Apr 2003 15:49:48 +0000 Subject: [PATCH] bitkeeper revision 1.167 (3e9c2a1cybYVjrCykA3xQxx7oMQp0g) configuration tweaks + orphan --- xen/drivers/ide/ide.c | 79 ++++++++++++------- .../arch/xeno/defconfig | 7 +- 2 files changed, 55 insertions(+), 31 deletions(-) diff --git a/xen/drivers/ide/ide.c b/xen/drivers/ide/ide.c index 84edfa28d6..86cf7bca66 100644 --- a/xen/drivers/ide/ide.c +++ b/xen/drivers/ide/ide.c @@ -520,7 +520,6 @@ void atapi_input_bytes (ide_drive_t *drive, void *buffer, unsigned int bytecount drive, buffer, bytecount); return; } -printk("XXXXX atapi_input_bytes called -- mapping is likely broken\n"); ++bytecount; #if defined(CONFIG_ATARI) || defined(CONFIG_Q40) if (MACH_IS_ATARI || MACH_IS_Q40) { @@ -542,8 +541,6 @@ void atapi_output_bytes (ide_drive_t *drive, void *buffer, unsigned int bytecoun return; } -printk("XXXXX atapi_output_bytes called -- mapping is likely broken\n"); - ++bytecount; #if defined(CONFIG_ATARI) || defined(CONFIG_Q40) if (MACH_IS_ATARI || MACH_IS_Q40) { @@ -2021,38 +2018,60 @@ void ide_init_drive_cmd (struct request *rq) */ int ide_do_drive_cmd (ide_drive_t *drive, struct request *rq, ide_action_t action) { - unsigned long flags; - ide_hwgroup_t *hwgroup = HWGROUP(drive); - unsigned int major = HWIF(drive)->major; - struct list_head *queue_head = &drive->queue.queue_head; - /*DECLARE_COMPLETION(wait);*/ + unsigned long flags; + ide_hwgroup_t *hwgroup = HWGROUP(drive); + unsigned int major = HWIF(drive)->major; + struct list_head *queue_head = &drive->queue.queue_head; +#if 0 + DECLARE_COMPLETION(wait); +#else + int wait = 1; + int usecs = 0; +#endif + #ifdef CONFIG_BLK_DEV_PDC4030 - if (HWIF(drive)->chipset == ide_pdc4030 && rq->buffer != NULL) - return -ENOSYS; /* special drive cmds not supported */ + if (HWIF(drive)->chipset == ide_pdc4030 && rq->buffer != NULL) + return -ENOSYS; /* special drive cmds not supported */ #endif - rq->errors = 0; - rq->rq_status = RQ_ACTIVE; - rq->rq_dev = MKDEV(major,(drive->select.b.unit)<rq = NULL; - } else { - if (action == ide_wait || action == ide_end) { - queue_head = queue_head->prev; - } else - queue_head = queue_head->next; + rq->errors = 0; + rq->rq_status = RQ_ACTIVE; + rq->rq_dev = MKDEV(major,(drive->select.b.unit)< we'll spin instead */ + rq->waiting = (void *)&wait; + } + + spin_lock_irqsave(&io_request_lock, flags); + if (list_empty(queue_head) || action == ide_preempt) { + if (action == ide_preempt) + hwgroup->rq = NULL; + } else { + if (action == ide_wait || action == ide_end) { + queue_head = queue_head->prev; + } else + queue_head = queue_head->next; + } + list_add(&rq->queue, queue_head); + ide_do_request(hwgroup, 0); + spin_unlock_irqrestore(&io_request_lock, flags); + + /* XXX SMH: spin waiting for response */ + if (action == ide_wait) { + while(*(int *)rq->waiting) { + udelay(500); + usecs += 500; + if(usecs > 1000000) { + printk("ide_do_drive_cmd [ide_wait]: giving up after 1s\n"); + *(int *)rq->waiting = 0; + } } - list_add(&rq->queue, queue_head); - ide_do_request(hwgroup, 0); - spin_unlock_irqrestore(&io_request_lock, flags); - return 0; + } + return 0; + } /* diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/defconfig b/xenolinux-2.4.21-pre4-sparse/arch/xeno/defconfig index 383561043d..96ede4cd2e 100644 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/defconfig +++ b/xenolinux-2.4.21-pre4-sparse/arch/xeno/defconfig @@ -288,6 +288,8 @@ CONFIG_JBD=y # CONFIG_TMPFS is not set # CONFIG_RAMFS is not set CONFIG_ISO9660_FS=y +CONFIG_JOLIET=y +CONFIG_ZISOFS=y # CONFIG_MINIX_FS is not set # CONFIG_VXFS_FS is not set # CONFIG_NTFS_FS is not set @@ -400,6 +402,9 @@ CONFIG_KALLSYMS=y # CONFIG_JFS_FS is not set # CONFIG_QNX4FS_FS is not set - +# +# Library routines +# +CONFIG_ZLIB_INFLATE=y -- 2.30.2